#include "selectServer.hpp"
#include <memory>

using namespace std;
using namespace select_ns;

static void usage(std::string proc)
{
    std::cerr << "Usage:\n\t" << proc << "port"
              << "\n\n";
}

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        usage(argv[0]);
        exit(USAGE_ERR);
    }
    unique_ptr<selectServer> svr(new selectServer(atoi(argv[1])));

    svr->initServer();

    svr->start();

    return 0;
}